<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('aggregate_fix_reports', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('operator_id')->comment('操作人');
            $table->bigInteger('sheet_template_id')->comment('报表模板ID');
            $table->string('frequency')->comment('频次');
            $table->mediumInteger('year')->comment('年份');
            $table->string('key')->comment('键 月份(1-12)、季度(1-4)、半年度、年度等类型的值');
            $table->json('data')->comment('数据');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('汇总修正表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('aggregate_fix_reports');
    }
};
